<?php
defined('APP_PATH') or die ('Unauthorized access'); 

/**
 * detail
 * @author Chris Zhou
 *
 */
class DetailController extends Controller
{
	private $_blog = null;
	public function __construct()
	{
		$this->_blog = Load::Model('blog');
	}
	
	public function index()
	{
		$this->view->title = '风之紫色\'s blog';	
		
		$id = intval($this->request('id'));
		
		$bloginfo = $this->_blog->getBlogInfo($id);
		$tags = explode(' ',$bloginfo['tags']);
		$bloginfo['tags'] = $tags;
		$this->view->bloginfo = $bloginfo;
	}
}